/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.modulars.customer.record.service;

import org.opsli.api.wrapper.customer.record.CustomerRecordModel;
import org.opsli.core.base.service.interfaces.CrudServiceInterface;
import org.opsli.modulars.customer.record.entity.CustomerRecord;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

/**
 * BrokerRecord Service
 *
 * @author guagua
 * @date 2025-06-12 13:51:39
 */
public interface ICustomerRecordService extends CrudServiceInterface<CustomerRecord, CustomerRecordModel> {
    /**
     * 添加提醒
     *
     * @param brokerId     经纪人记录ID
     * @param reminderTime 提醒时间
     * @param email        提醒邮箱
     * @param content      提醒内容
     */
    void addReminder(String brokerId, Date reminderTime, String email, String content);

    @Scheduled(cron = "0 */1 * * * ?")
        // 每分钟执行一次
    void checkAndSendReminders();
}